import request from '../request'

const Api = {
  page: '/api/admincourseBasicInformation/courseBasicInformation/page',
  save: '/api/admincourseBasicInformation/courseBasicInformation/save',
  remove: '/api/admincourseBasicInformation/courseBasicInformation/remove',
  selectById: '/api/admincourseBasicInformation/courseBasicInformation/selectById',
  update: '/api/admincourseBasicInformation/courseBasicInformation/update',

  template: '/api/admincourseBasicInformation/courseBasicInformation/exportExcel',
  imports: '/api/admincourseBasicInformation/courseBasicInformation/importExcel',
  upload: '/api/admincourseBasicInformation/courseBasicInformation/multipartUpload'

}

/** 新增课程基本信息 */
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}

export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}

export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}

export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}

export const selectById = params => {
  return request.request({
    url: Api.selectById,
    params,
    method: 'GET'
  })
}
/** 文件导入 */
export const imports = data => {
  return request.request({
    url: Api.imports,
    data,
    method: 'post'
  })
}
export const upload = data => {
  return request.request({
    url: Api.upload,
    data,
    method: 'post'
  })
}
export const templateUrl = Api.template